package org.autumn.jvm;

import java.util.ArrayList;

public class OutOfmemory {
    public static void main(String[] args) {
        // -Xmx8M
        String hello = "hello";
        ArrayList<Object> list = new ArrayList<>();

        while (true){
            list.add(hello);
            hello += hello;
        }
    }
}
